

function testFunc(int_a, string_b)
	print(int_a, string_b)
end

function testPrint()
	--print("###################### count:" .. gTestClass:count())
	print("###################### result:")
	print(tabToStr(tttt))
	
end

function main()
	print("Please input your command:")
	while true do
		local str = io.read()
		str = transCommand(str)
		local f = loadstring(str)
		xpcall(f, function(err) print(err) end)
	end
end


command_replace = {
	['p '] = function (str) 
				local a,b = string.gsub(str, "p ", "p(")
				a = a .. ')'
				return a
			end
}

function transCommand(str)
	for k, v in pairs(command_replace) do
		local a,b = string.gsub(str, "p ", "p(")
		if b > 0 then str = v(a) end
	end

	return str
end

